<template>
  <div></div>
</template>
<script>
export default {
  data() {
    return {
      token:this.$route.query.token || '',
    };
  },
  methods: {
    init() {
      // 有就在当前页面,没有就去MIS
      if (this.token.indexOf("Bearer ") > -1) {
        this.$store.dispatch('$setToken', this.token);
        window.location.href = window.location.origin;
      } else {
        this.$store.dispatch('$setToken', '');
        window.location.href = process.env.VUE_APP_LOGIN_SITE;
      }
    },
  },
  mounted() {
    this.init();
  },
};
</script>
<style lang="less" scoped></style>
